{template 'admin','header'}
<form action="{$self_url}?action=search" onsubmit="return r_submit(this);">
<table width="100%" cellpadding="0">
<tr>
	
	<td width="120"><strong>类型:</strong>
	<select name="type">
	{loop $types $t}
		<option value="{$t}" {if $t==$type} selected {/if}>{$t}</option>
	{/loop}
	</select></td>
	<td width="180">&nbsp;&nbsp;<strong>日期:</strong>{date_tool('date',str_replace('/','-',$time))}</td>
	<td><input type="submit" value="搜索"></td>	
</tr>
</table>
</form>
<table class="table_list">
 <caption>日志管理列表</caption>
 <tr>
	 <th class="align_c">日志信息</th>
	 <th class="align_c">请求地址</th>
	 <th class="align_c" width="150">产生时间</th>
	 <th class="align_c" width="80">操作ip</th>
 </tr>
 {if ($list === false) || sizeof($list)==0}
 <tr><td class="align_c" colspan="4">当天没有此类型日志</td></tr>
 {else}
	 {loop $list $l}
		 <tr>
			 <td>{$l['0']}</td>
			 <td>{$l['1']}</td>
			 <td class="align_c">{$l['2']}</td>
			 <td class="align_c">{$l['3']}</td>
		 </tr>
	 {/loop}
 {/if}
</table>
<div class="button_box">
{if check_perms('log002')===true}
	<form action="{$self_url}?action=del" method="POST" name="form2" onsubmit="return r_submit(this);">
	<select name="time" id="time">
		<option value="current">清空当天日志</option>
		<option value="1w">清空一周内日志</option>
		<option value="1m">清空本月内日志</option>
		<option value="6m">清空半年内日志</option>
		<option value="1y">清空本年内日志</option>
		<option value="all">清空所有日志</option>
	</select>
	<input type="hidden" name="date" value="{str_replace('/','-',$time)}">
	<input type="hidden" name="type" value="{$type}">
	<input type="button" value=" 清空 " onclick="if(confirm('确定要'+document.getElementById('time').options[document.getElementById('time').selectedIndex].text+'吗？')){change_opt('form2','{$self_url}?action=del');}" class="button_style">
	</form>
{/if}
</div>

<div id="pages">
{$pages}
</div>
{template 'admin','footer'}